package book;

public class Book {
    private String name;
    private String anthor;
    private double price;
    private String type;
    private boolean Lending_situation;

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", anthor='" + anthor + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ((Lending_situation==true)?"已经借出":"未被借出")+
                '}';
    }

    public Book(String name, String anthor, double price, String type) {
        this.name = name;
        this.anthor = anthor;
        this.price = price;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAnthor() {
        return anthor;
    }

    public void setAnthor(String anthor) {
        this.anthor = anthor;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isLending_situation() {
        return Lending_situation;
    }

    public void setLending_situation(boolean lending_situation) {
        Lending_situation = lending_situation;
    }
}
